package com.yzk.auction.service;
import com.yzk.auction.dao.BiddingDao;
import com.yzk.auction.entity.Bidding;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;

public class BiddingService {

    public static List<Bidding> listGoods(int id){
        return BiddingDao.query(id);
    }

    public static long count(){
        return BiddingDao.biddingCount();
    }

    public static void insert(long bidding_id, int bidding_status, int user_id, double bidding_price, Date bidding_time, int goods_id) throws SQLException {
        BiddingDao.insert(bidding_id,bidding_status,user_id,bidding_price,bidding_time,goods_id);
    }
    public void updateStatus(int goods_id) throws SQLException {
        BiddingDao biddingDao = new BiddingDao();
        biddingDao.updateStatus(goods_id);
    }
}
